﻿@using KL.Store.Core;
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>@ViewBag.Title | @Parameters.WebSiteTitle</title>
    @*<meta name="keywords" content='@ViewBag.Keywords'/>*@
    <meta name="description" content='@ViewBag.Description'/>
    @if (!string.IsNullOrEmpty(Parameters.FaceBookAppId))
    {
        <meta property="fb:app_id" content="@Parameters.FaceBookAppId"/>
    }
    <link href="~/Images/@(Parameters.Theme)/favicon.png" rel="shortcut icon" type="image/x-icon" />
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
    <meta name="viewport" content="width=device-width" />
    <meta name="language" content="Turkish">
    <meta name="content-language" content="tr-TR" />

    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/eStore.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/normalize.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/bootstrap.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/bootstrap-responsive.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/font.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/stylesheet.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/cloud-zoom.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/simple_menu.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/slideshow.css")" rel="stylesheet" type="text/css" />
    @*<link href="@Url.Content("~/Content/" + Parameters.Theme + "/flexslider.css")" rel="stylesheet" type="text/css" />*@
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/livesearch.css")" rel="stylesheet" type="text/css" />
    @*<link href="@Url.Content("~/Content/" + Parameters.Theme + "/skeleton.css")" rel="stylesheet" type="text/css" />*@
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/320.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/480.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/768.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/product.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/modules/superfish-modified.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/modules/nivo-slider.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/modules/customcontent.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/" + Parameters.Theme + "/modules/addhomefeatured.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/font-awesome.min.css")" rel="stylesheet" />

    <link href="@Url.Content("~/Content/carousel.css")" rel="stylesheet" type="text/css" />

    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery-ui-1.8.16.custom.min.js")" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.nivo.slider.pack.js")" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/bootstrap.js")" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/mainscript.js")" type="text/javascript"></script>
    @*<script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/plugins.js")" type="text/javascript"></script>*@
    @*<script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/tools.js")" type="text/javascript"></script>*@
    @*<script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.jqzoom.js")" type="text/javascript"></script>*@
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.scrollpane.js")" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.flexslider.js")" type="text/javascript"></script>
    <script src="@(Parameters.WebSiteScriptUrl)@Url.Content("~/scripts/jquery.carouFredSel-6.2.1.js")" type="text/javascript"></script>

    <script type="text/javascript">
        function GetSearchProduct()
        {
            var myText = $("#Search").val();
            $.ajax({
                url: '/Search/LiveSearch?search=' + myText,
                type: 'POST',
                success: function (result)
                {
                    $("#divLoadingGif").css("display", "none");
                    var myProductList = $(result);
                    var myHtlmString = '';
                    $.each(myProductList[0].LiveSearch, function (key, val)
                    {
                        myHtlmString += '<li><a href="' + val.LinkUrl + '">' + val.ProductCode + ' - ' + val.ProductName + '</a></li>';
                    });
                    myHtlmString = '<ul id="live_search_results">' + myHtlmString + '</ul>';
                    $("#divSearchResult").html(myHtlmString);
                }
            });
        }
        var search = (function ()
        {
            var builder = function ()
            {
                $(document).ready(function ()
                {
                    var object = $('#Search', $('.window.searchview').hide().parent()).focus(function ()
                    {
                        this.active = true;
                        var value = $.trim(this.value);
                        if (value == object.data('empty'))
                        {
                            object.val('').parent().addClass('focus');
                        } else if (value.length >= 3) { search.show(); }
                    }).blur(function ()
                    {
                        this.active = false;

                        $(this.parentNode).removeClass('focus');
                        if ($.trim(object.val()) == '') { object.val(object.data('empty')); }
                    }).keyup(function ()
                    {
                        if (object.val().length >= 4)
                        {
                            $("#divLoadingGif").css("display", "block");
                            GetSearchProduct();
                            search.show();
                            $(this.parentNode).removeClass('focus');
                        } else
                        {
                            search.hide();
                            $(this.parentNode).addClass('focus');
                        }
                    });

                    var parent = object.parents('.container').hover(function () { this.active = true; }, function ()
                    {
                        this.active = false;
                        if (!object.prop('active')) { search.hide(); }
                    });
                });
            }
            builder.prototype = {
                busy: false,
                show: function () { $('.window.searchview').stop(true, true).animate({ opacity: 'show', height: 'show' }, 'fast'); },
                hide: function () { $('.window.searchview').stop(true, true).animate({ opacity: 'hide', height: 'hide' }, 'fast'); }
            };

            return new builder();
        })();
    </script>
    @Html.Raw(Parameters.LiveChatScript)
</head>
<body>
    <div id="main">
        @*<div class="container_24">
            <div class="grid_24 right">
                @{
                    Html.RenderAction("Login", "Partials");
                }
            </div>
        </div>*@
        <div class="main-wrap">
            <header class="container" id="header">
                <div id="header-inner">
                    <a href="@Url.Content("~/")" id="header_logo">
                        <img src="/images/@(Parameters.Theme)/logo.png" alt="@(Parameters.WebSiteTitle)" title="@(Parameters.WebSiteTitle)" class="logo"></a>
                    <section class="header-box blockpermanentlinks-header">
                        <ul id="header_links">
                            <li><a data-original-title="anasayfa" data-placement="bottom" rel="tooltip" class="header_links_home" title="" href="@Url.Content("~/")"><i class="icon-home"></i></a></li>
                            <li id="header_link_contactus"><a data-original-title="bize ulaşın" data-placement="bottom" rel="tooltip" title="" href="@Url.Content("~/Content/ContactUs")"><i class="icon-info-sign"></i></a></li>
                            <li id="header_link_contact"><a data-original-title="iletişim" data-placement="bottom" rel="tooltip" title="" href="@Url.Content("~/ContactUs/Index")"><i class="icon-envelope-alt"></i></a></li>
                            <li id="header_link_account"><a data-original-title="hesabım" data-placement="bottom" rel="tooltip" title="" href="@Url.Content("~/Account/Index")"><i class="icon-user"></i></a></li>
                            <li id="header_link_fblogin"><a id="BtnFBLogin" data-original-title="Facebook İle Giriş Yap" data-placement="bottom" rel="tooltip" title="" href="#">
                                <img src="../../Images/BT/facebook_login.png" /></a></li>
                        </ul>

                        <div class="mobile-link-top header-button">
                            <h4>
                                <span class="title-hed"></span><span class="arrow_header_top_menu arrow_header_top"></span>
                            </h4>
                            <ul class="list_header" id="mobilelink">
                                <li><a class="header_links_home" title="anasayfa" href="@Url.Content("~/")"><span class="st1">anasayfa</span></a></li>
                                <li id="header_link_sitemap"><a title="sizden gelenler" href="@Url.Content("~/Content/CustomerFeedBack")"><span class="st1">sizden gelenler</span></a></li>
                                <li id="header_link_contact"><a title="iletişim" href="@Url.Content("~/ContactUs/Index")"><span class="st1">iletişim</span></a></li>
                                <li id="header_link_bookmark"><a title="hesabım" href="@Url.Content("~/Account/Index")"><span class="st1">hesabım</span></a>
                                </li>
                            </ul>
                        </div>
                    </section>
                    <section class="blockuserinfo header-box">
                        @{
                            Html.RenderAction("Login", "Partials");
                        }
                    </section>
                    @*Arama*@
                    <section class="header-box top-search-form" id="search_block_top">
                        <form id="searchbox" action="/Search/Index" method="get">
                            <p>
                                <label for="search_query_top">Search</label>
                                <input type="text" name="Search" id="Search search_query_top" placeholder="Ara" class="input-search search_query ac_input" autocomplete="off" />
                                <a href="javascript:document.getElementById('searchbox').submit();"></a>
                            </p>
                            <div id="livesearch_search_results" class="window searchview" style="display: none;">
                                <div id="divSearchResult" style="width: 440px; padding: 6px;">
                                </div>
                            </div>
                        </form>
                    </section>
                    @*Cart*@
                    <section class="blockuserinfo-cart header-box" id="header_user">
                        <div id="shopping_cart">
                            <strong class="opancart"></strong>
                            <a data-original-title="Sepet" data-placement="bottom" rel="tooltip" title="" href="@Url.Content("~/Cart/Index")"><span class="shopping_cart_title">Sepet:</span></a>
                            <span class="ajax_cart_no_product prod_count" id="cart">
                                @{
                                    Html.RenderAction("GetSummary2", "Cart");
                                }
                            </span>
                        </div>
                    </section>
                    @*Menu*@
                    <div class="clearfix" id="menu-wrap">
                        <div id="menu-trigger">Categories<span class="menu-icon"></span></div>
                        @*Html.Raw(Parameters.PageMainMenu)*@
                        @RenderSection("menu", required: false)
                    </div>
                </div>
                <div class="container">
                    @RenderSection("featured", required: false)
                </div>
            </header>

            @*Orta*@

            @*<div class="row-1">
                <div id="header2">
                    <div class="header-row">
                    <form id="searchForm" action="/Search/Index">
                        <div id="searchDiv">
                            <div class="search-right">
                                <div class="button-search" onclick="searchForm.submit();">
                                </div>
                                <span class="search-bg">
                                    <input type="text" name="Search" id="Search" placeholder="Ara" onkeydown="this.style.color = '#b3b3b3';" autocomplete="off" />
                                </span>
                            </div>
                            <div id="livesearch_search_results" class="window searchview" style="display: none;">
                                <div id="divSearchResult" style="width: 440px; padding: 6px;">
                                </div>
                            </div>
                        </div>
                    </form>
                    <div class="clear">
                    </div>
                </div>
                    @RenderSection("sidebar", required: false)
                </div>
                <div class="clear">
                </div>
            </div>*@
            @RenderSection("sidebar", required: false)
            <div class="main-content container">
                <section id="slider-wrapper">
                    <div class="container_24 clearfix">
                        <div class="grid_6">
                            @RenderSection("sidefeatured", required: false)
                        </div>
                    </div>
                </section>
                <div class="container_24 primary_content_wrap clearfix">
                    @RenderSection("belowbanner", required: false)
                    <div class="clearfix">
                        <div id="content" class="grid_18 @(ViewBag.Controller)">
                            @RenderSection("relatedlists", required: false)
                            @RenderBody()
                        </div>
                        <div class="grid_6">
                            <div id="left-content-area">
                                <script type="text/javascript">
                                    $(document).ready(function ()
                                    {
                                        $(".act-cat").toggle(
                                            function ()
                                            {
                                                $(this).next('.level-2-cat').slideToggle("slow", {
                                                    duration: 'slow',
                                                    easing: 'easeOutBounce'
                                                });
                                            },
                                            function ()
                                            {
                                                $(this).next('.level-2-cat').slideToggle("slow", {
                                                    duration: 'slow',
                                                    easing: 'easeOutBounce'
                                                });
                                            }
                                        );
                                        $('.box-category li').last().addClass('last');
                                        $('.box-category li li').last().addClass('last');
                                        /*Anasayfa ürün listesi düzenlemeleri*/
                                        //$('div.toCart a.addToCart img').attr({ 'src': '', 'alt': '' });
                                        //$('div.toCart a.addToCart').attr({ 'class': 'addToCart exclusive ajax_add_to_cart_button btn_add_cart' });
                                        //$(' .summary .description .cart .addToCart img').attr({ 'src': '' });
                                        //$('li.product-height div.price br').remove();
                                        $('#menu-wrap .box-category ul').attr({ 'id': 'menu-custom' });
                                        $('#menu-wrap .box-category ul li:first-child').attr({ 'class': 'first' });
                                        $('#menu-wrap .box-category').attr({ 'class': '' });
                                        //$('.product-height').each(function () {
                                        //    var subcatname = $(this).find('.subcatname').html();
                                        //    var viewLink = $(this).find('.subcatname a').attr('href');
                                        //    $(this).find('.price').before('<div class="subcatname1"></div>');
                                        //    $(this).find('.subcatname1').html(subcatname);
                                        //    $(this).find('.subcatname').remove();
                                        //    $(this).find('.subcatname1').attr({ 'class': 'name subcatname' });
                                        //    $(this).find('.price').find('span.taxinc').remove();
                                        //    $(this).find('.toCart').after('<div class="viewProduct">' +
                                        //        '<a data-placement="bottom" rel="tooltip" href="' + viewLink + '" class="button" data-original-title="Ürünü Gör" title="Ürünü Gör">Ürünü Gör</a>' +
                                        //        '</div>');
                                        //    $(this).find('.toCart a').attr({ 'rel': 'tooltip', 'title': 'Sepete Ekle', 'data-original-title': 'Sepete Ekle', 'data-placement': 'bottom' });
                                        //});
                                        /*Anasayfa ürün listesi düzenlemeleri*/
                                    });
                                </script>
                                @RenderSection("brands", required: false)
                                @RenderSection("bestseller", required: false)
                                @RenderSection("account", required: false)
                                @RenderSection("info", required: false)
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <footer id="footer" class="container">
                @Html.Raw(Parameters.PageFooter)
            </footer>
        </div>
    </div>



    <div id="Loading">
        <div class="Loading">
            <img src="/Images/Default/loading.gif" alt="Loading" />
        </div>
    </div>
    <script type="text/javascript">
        $('#Loading').hide();

        $('a.pLink222').click(function ()
        {
            var qsId = $(this).attr('id').split("_")[1];
            $('#content').load('/Products/Get', { id: qsId });

            $('a.pLink').removeClass("active");
            $('a.cLink').removeClass("active");
            $(this).addClass("active");
            return false;
        });
        $('a.cLink222').click(function ()
        {
            var qsId = $(this).attr('id').split("_")[1];
            $('#content').load('/Categories/Get', { id: qsId });

            $('a.pLink').removeClass("active");
            $('a.cLink').removeClass("active");
            $(this).addClass("active");
            return false;
        });

        var afth = $('a.cLink[href="' + location.pathname + '"]');
        if (afth.attr('id') == undefined)
        {
            afth = $('a.pLink[href="' + location.pathname + '"]');
        }

        if (afth.attr('id') != undefined)
        {
            afth.addClass('active');

            afth.parents('ul').css('display', 'block');

            afth.parent().addClass('active');
            afth.parent().parents('ul').css('display', 'block');
            afth.parent('ul').css('display', 'block');
        }
    </script>
    <script type="text/javascript">
        // initialise plugins
        jQuery(function ()
        {
            $("nav select").change(function ()
            {
                window.location = $(this).find("option:selected").val();
            });
            //// main navigation init
            //jQuery('ul.sf-menu').superfish({
            //    delay: 1000, 		// one second delay on mouseout 
            //    animation: { opacity: 'show', height: 'show' }, // fade-in and slide-down animation
            //    speed: 'normal',  // faster animation speed 
            //    autoArrows: false,   // generation of arrow mark-up (for submenu) 
            //    dropShadows: false
            //});

            // prettyphoto init
            if (jQuery(window).width() > 480)
            {
                jQuery("a[rel^='prettyPhoto']").prettyPhoto({
                    animation_speed: 'normal',
                    slideshow: 5000,
                    autoplay_slideshow: false,
                    overlay_gallery: true
                });
            }
            else
            {
                jQuery("a[rel^='prettyPhoto']").click(function ()
                {
                    return false;
                });
            }

            // Initialize the gallery
            //jQuery("#gallery .touch-item").touchTouch();
        });

        jQuery(function ()
        {
            var ismobile = navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(android)|(webOS)/i)
            if (ismobile)
            {
                jQuery('.sf-menu').sftouchscreen({});
            }
        });

        //// Init for audiojs
        //audiojs.events.ready(function () {
        //    var as = audiojs.createAll();
        //});

        // Init for si.files
        //SI.Files.stylizeAll();
    </script>
    @Html.Raw(Parameters.AddThisShareButtonsSmartLayerScript)
</body>
</html>
